#pragma once
#include"RBTree.h"

namespace zy
{
	template<class K>
	class set
	{
		struct SetKeyofT
		{
			const K& operator()(const K& k)
			{
				return k;
			}
		};
	public:
		typedef typename RBTree<K,const K, SetKeyofT>::Iterator iterator;
		typedef typename RBTree<K,const K, SetKeyofT>::Const_Iterator const_iterator;
		
		iterator begin()
		{
			return _t.Begin();
		}

		iterator end()
		{
			return _t.End();
		}
		const_iterator begin() const
		{
			return _t.Begin();
		}

		const_iterator end() const
		{
			return _t.End();
		}
		
		pair<iterator, bool> insert(const K& k)
		{
			return _t.Insert(k);
		}

		iterator find(const K& k)
		{
			return _t.Find(k);
		}

	private:
		RBTree<K,const K, SetKeyofT> _t;
	};
}